<?php
/**
 * Loop Blog
 * The main template file for display portfolio page.
 * Author : TT
 * @package WordPress
*/
wp_enqueue_script('prettyPhoto');
rewind_posts();
if(have_posts()):
while(have_posts()) : the_post();


$imagethumb = '';
$image_fullwidth ='';


if(has_post_thumbnail())
{
$imageid=get_post_thumbnail_id(get_the_ID());
$imagethumb = wp_get_attachment_image_src($imageid,'size-696-282');
$image_fullwidth = wp_get_attachment_image_src($imageid,'size-500-346');
}
?>
<!-- About Content Start -->
			   <div class="right-inner">
                    <div id="post-<?php the_ID(); ?>" <?php post_class("blog-post"); ?>>
                    	<?php
  						 $blog_enable_time = get_theme_option('blog','blog_enable_time');
  						 if($blog_enable_time == true) :
  						?>
						 
						<div class="blog-date">
                        	<span><?php echo get_the_time('M'); ?> / <?php echo get_the_time('d'); ?></span>
                            <span><a href="<?php the_permalink(); ?>"><?php echo get_comments_number(get_the_ID());?></a></span>
                        </div>
						<?php
						endif;
						?>
                        <div class="mosaic-block bar2">
                            <div class="mosaic-overlay">
                                <div class="details">
                                    <h2><?php the_title();?></h2>
									<?php
                					$blog_enable_lightbox =get_theme_option('blog','blog_enable_lightbox');
                					if($blog_enable_lightbox=='true') :
										 if(get_post_meta(get_the_ID(),'post_featured_content',true) == 'Youtube Video'):
									?>
									<div><a rel="prettyPhoto" class="video-icon" href="http://www.youtube.com/watch?v=<?php echo get_post_meta(get_the_ID(),'post_video_id'); ?>" title="<?php the_title(); ?>"></a> <a href="<?php the_permalink(); ?>" class="plus-icon">&nbsp;</a></div>
									<?php
										 elseif(get_post_meta(get_the_ID(),'post_featured_content',true) == 'Vimeo Video'):
									?>
									<div><a rel="prettyPhoto" class="video-icon" href="http://vimeo.com/<?php echo get_post_meta(get_the_ID(),'post_video_id'); ?>" title="<?php the_title(); ?>"></a> <a href="<?php the_permalink(); ?>" class="plus-icon">&nbsp;</a></div>
    								<?php	else:																	 
                					?>
                                    <div><a rel="prettyPhoto" class="zoom-icon" href="<?php echo $image_fullwidth[0]; ?>" title="<?php the_title(); ?>"></a> <a href="<?php the_permalink(); ?>" class="plus-icon">&nbsp;</a></div>
                					<?php
									endif;
                					else : 
                					?>
                					
                					<div><a href="<?php the_permalink(); ?>" class="plus-icon">&nbsp;</a></div>
                					<?php
                					endif;
                					?>																		
                                </div>
                            </div>
                            <div class="mosaic-backdrop"><img src="<?php echo $imagethumb[0];?>" alt="<?php the_title(); ?>"></div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
                <div class="clearfix"></div>
                <div class="seperator"><img src="<?php echo SKIN_URI; ?>/star_bg.png" alt=""></div>
<?php
endwhile;
tt_pagination();
endif;	
?>
				 
